1. Field of the Invention
The present invention relates to an image forming apparatus that corrects positional deviations of colors by forming positional deviation correction patterns and to a method for controlling the image forming apparatus.
2. Description of the Related Art
Among electrophotographic image forming apparatuses, tandem type image forming apparatuses having a plurality of photosensitive elements for forming images of mutually different colors are commonly used. The tandem type image forming apparatus forms a static latent image on each of the photosensitive elements by optical writing, and transfers a toner image obtained by developing the static latent image onto a printing medium or an intermediate transfer body. The tandem type image forming apparatus performs this transfer operation for each color, and superimposes the toner images of the colors onto the printing medium or the intermediate transfer body to obtain a full-color toner image. If the toner image is transferred onto the intermediate transfer body, the transferred toner image is further transferred from the intermediate transfer body onto the printing medium. The toner image transferred onto the printing medium is fixed to the printing medium to obtain a color image.
In such an image forming apparatus, if transfer positions of the colors are deviated from each other, the toner images of the colors are not properly superimposed, and thus, the image quality of the printed image deteriorates. Therefore, the deviation among the transfer positions of the colors needs to be corrected.
For the electrophotographic image forming apparatus, there is already known, as a method for correcting deviations of transfer positions of colors (hereinafter called as positional deviations for short), a method in which positional deviation correction patterns are formed on a conveying belt for carrying the printing medium or on the intermediate transfer body, and the positional deviations are corrected based on positional information obtained by detecting the positions of the positional deviation correction patterns with sensors.
There is also already known a method in which, when a specified number of positional deviation correction patterns are detected by sensors, an interrupt is generated in a central processing unit (CPU), and the results of the detection are stored in a memory. With this method, a plurality of positional deviation correction patterns can be detected at a high speed and with high accuracy.
For example, Japanese Patent Application Laid-open No. 2008-77066 discloses a technique of making correction processing faster and more efficient by simultaneously forming and detecting a plurality of types of correction patterns. According to Japanese Patent Application Laid-open No. 2008-77066, line detection signals of the positional deviation correction patterns are sampled and stored in a FIFO memory, and, after one set of line rows are detected, the data stored in the FIFO memory is read into a random access memory (RAM) and is subjected to predetermined arithmetic processing. This processing is applied to a plurality of such sets of line rows, and correction data is eventually obtained.
In the method for correcting the positional deviations by the conventional technique using the interrupt in the CPU, it is necessary to set a pattern distance of a part corresponding to the timing of storing detection results in the memory by generating the interrupt larger than pattern distances of the other parts.
For example, consider a case of storing detection results in the memory each time when a specified number of patterns are detected. As such a detection example, an example is given in which specified numbers of first and second patterns are used, and positional deviations are detected in the sub-scanning direction and in the main-scanning direction, respectively. In such a case, an interrupt for memory writing is generated during a period from immediately after the specified number of patterns have been detected until detection of the next pattern begins. Therefore, in order to properly store the detection results in the memory, a predetermined margin period needs to be provided for timing of generating the interrupt.
However, conventionally, in order to deal with cases such as when sensors are inclined with respect to a correct pattern, it has been necessary to set the margin period for the interrupt timing longer than in the case in which the inclination of the sensors or the like is not taken into consideration. There has been a problem that ensuring a longer margin period for the interrupt makes the overall length of patterns longer, and thus requires a longer time for the positional deviation correction processing.
Even Japanese Patent Application Laid-open No. 2008-77066 described above cannot resolve the problem that ensuring a margin for the interrupt part makes the overall length of patterns longer, and thus requires a longer time for the positional deviation correction processing.